package com.cskaoyan.day5;

public class arrTest {
    public static void main(String[] args) {
        System.out.println(getMaxValue(1, 2, 3, 4, 5, 6, 7));
    }

    private static int getMaxValue(int... args) {
        int max = args[0];
        for (int arg : args) {
            if (max < arg) {
                max = arg;
            }
        }
        return max;
    }
}
